package com.spring.springmvc.请求.传参;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@RequestMapping("/array")
@RestController
public class 传递数组 {
    @RequestMapping("/r1")
    public String receive(int[] array){
        return "数组："+ Arrays.toString(array);
    }

}
/*
两种赋值方法：
1. http://127.0.0.1:8080/array/r1?array=12&array=14
2. http://127.0.0.1:8080/array/r1?array=12,14,243

 */
